#include <dt-bindings/clock/qcom,gcc-sdm660.h>
#include <dt-bindings/clock/qcom,mmcc-sdm660.h>
#include <dt-bindings/msm/msm-bus-ids.h>
#include <dt-bindings/clock/qcom,rpmcc.h>
#include <dt-bindings/interrupt-controller/arm-gic.h>

&soc {
	anoc2_smmu: arm,smmu-anoc2@16c0000 {
		compatible = "qcom,smmu-v2";
		reg = <0x16c0000 0x40000>;
		#iommu-cells = <1>;
		qcom,skip-init;
		qcom,use-3-lvl-tables;
		qcom,regulator-names = "vdd";
		#global-interrupts = <2>;
		interrupts = <GIC_SPI 229 IRQ_TYPE_LEVEL_HIGH>,
			     <GIC_SPI 231 IRQ_TYPE_LEVEL_HIGH>,
			     <GIC_SPI 373 IRQ_TYPE_LEVEL_HIGH>,
			     <GIC_SPI 374 IRQ_TYPE_LEVEL_HIGH>,
			     <GIC_SPI 375 IRQ_TYPE_LEVEL_HIGH>,
			     <GIC_SPI 376 IRQ_TYPE_LEVEL_HIGH>,
			     <GIC_SPI 377 IRQ_TYPE_LEVEL_HIGH>,
			     <GIC_SPI 378 IRQ_TYPE_LEVEL_HIGH>,
			     <GIC_SPI 462 IRQ_TYPE_LEVEL_HIGH>,
			     <GIC_SPI 463 IRQ_TYPE_LEVEL_HIGH>,
			     <GIC_SPI 464 IRQ_TYPE_LEVEL_HIGH>,
			     <GIC_SPI 465 IRQ_TYPE_LEVEL_HIGH>,
			     <GIC_SPI 466 IRQ_TYPE_LEVEL_HIGH>,
			     <GIC_SPI 467 IRQ_TYPE_LEVEL_HIGH>,
			     <GIC_SPI 353 IRQ_TYPE_LEVEL_HIGH>,
			     <GIC_SPI 354 IRQ_TYPE_LEVEL_HIGH>,
			     <GIC_SPI 355 IRQ_TYPE_LEVEL_HIGH>,
			     <GIC_SPI 356 IRQ_TYPE_LEVEL_HIGH>,
			     <GIC_SPI 357 IRQ_TYPE_LEVEL_HIGH>,
			     <GIC_SPI 358 IRQ_TYPE_LEVEL_HIGH>,
			     <GIC_SPI 359 IRQ_TYPE_LEVEL_HIGH>,
			     <GIC_SPI 360 IRQ_TYPE_LEVEL_HIGH>,
			     <GIC_SPI 442 IRQ_TYPE_LEVEL_HIGH>,
			     <GIC_SPI 443 IRQ_TYPE_LEVEL_HIGH>,
			     <GIC_SPI 444 IRQ_TYPE_LEVEL_HIGH>,
			     <GIC_SPI 447 IRQ_TYPE_LEVEL_HIGH>,
			     <GIC_SPI 468 IRQ_TYPE_LEVEL_HIGH>,
			     <GIC_SPI 469 IRQ_TYPE_LEVEL_HIGH>,
			     <GIC_SPI 472 IRQ_TYPE_LEVEL_HIGH>,
			     <GIC_SPI 473 IRQ_TYPE_LEVEL_HIGH>,
			     <GIC_SPI 474 IRQ_TYPE_LEVEL_HIGH>;
		clocks = <&clock_rpmcc AGGR2_NOC_SMMU_CLK>;
		clock-names = "smmu_aggr2_noc_clk";
		#clock-cells = <1>;
	};

	lpass_q6_smmu: arm,smmu-lpass_q6@5100000 {
		compatible = "qcom,smmu-v2";
		reg = <0x5100000 0x40000>;
		#iommu-cells = <1>;
		qcom,skip-init;
		qcom,use-3-lvl-tables;
		qcom,regulator-names = "vdd";
		#global-interrupts = <2>;
		interrupts = <GIC_SPI 229 IRQ_TYPE_LEVEL_HIGH>,
			     <GIC_SPI 231 IRQ_TYPE_LEVEL_HIGH>,
			     <GIC_SPI 226 IRQ_TYPE_LEVEL_HIGH>,
			     <GIC_SPI 393 IRQ_TYPE_LEVEL_HIGH>,
			     <GIC_SPI 394 IRQ_TYPE_LEVEL_HIGH>,
			     <GIC_SPI 395 IRQ_TYPE_LEVEL_HIGH>,
			     <GIC_SPI 396 IRQ_TYPE_LEVEL_HIGH>,
			     <GIC_SPI 397 IRQ_TYPE_LEVEL_HIGH>,
			     <GIC_SPI 398 IRQ_TYPE_LEVEL_HIGH>,
			     <GIC_SPI 399 IRQ_TYPE_LEVEL_HIGH>,
			     <GIC_SPI 400 IRQ_TYPE_LEVEL_HIGH>,
			     <GIC_SPI 401 IRQ_TYPE_LEVEL_HIGH>,
			     <GIC_SPI 402 IRQ_TYPE_LEVEL_HIGH>,
			     <GIC_SPI 403 IRQ_TYPE_LEVEL_HIGH>,
			     <GIC_SPI 137 IRQ_TYPE_LEVEL_HIGH>,
			     <GIC_SPI 224 IRQ_TYPE_LEVEL_HIGH>,
			     <GIC_SPI 225 IRQ_TYPE_LEVEL_HIGH>,
			     <GIC_SPI 310 IRQ_TYPE_LEVEL_HIGH>,
			     <GIC_SPI 404 IRQ_TYPE_LEVEL_HIGH>;
		vdd-supply = <&gdsc_hlos1_vote_lpass_adsp>;
		clocks = <&clock_gcc HLOS1_VOTE_LPASS_ADSP_SMMU_CLK>;
		clock-names = "lpass_q6_smmu_clk";
		#clock-cells = <1>;
	};

	mmss_bimc_smmu: arm,smmu-mmss@cd00000 {
		compatible = "qcom,smmu-v2";
		reg = <0xcd00000 0x40000>;
		#iommu-cells = <1>;
		qcom,skip-init;
		qcom,use-3-lvl-tables;
		qcom,regulator-names = "vdd";
		#global-interrupts = <2>;
		interrupts = <GIC_SPI 229 IRQ_TYPE_LEVEL_HIGH>,
			     <GIC_SPI 231 IRQ_TYPE_LEVEL_HIGH>,
			     <GIC_SPI 263 IRQ_TYPE_LEVEL_HIGH>,
			     <GIC_SPI 266 IRQ_TYPE_LEVEL_HIGH>,
			     <GIC_SPI 267 IRQ_TYPE_LEVEL_HIGH>,
			     <GIC_SPI 268 IRQ_TYPE_LEVEL_HIGH>,
			     <GIC_SPI 244 IRQ_TYPE_LEVEL_HIGH>,
			     <GIC_SPI 245 IRQ_TYPE_LEVEL_HIGH>,
			     <GIC_SPI 247 IRQ_TYPE_LEVEL_HIGH>,
			     <GIC_SPI 248 IRQ_TYPE_LEVEL_HIGH>,
			     <GIC_SPI 249 IRQ_TYPE_LEVEL_HIGH>,
			     <GIC_SPI 250 IRQ_TYPE_LEVEL_HIGH>,
			     <GIC_SPI 251 IRQ_TYPE_LEVEL_HIGH>,
			     <GIC_SPI 252 IRQ_TYPE_LEVEL_HIGH>,
			     <GIC_SPI 253 IRQ_TYPE_LEVEL_HIGH>,
			     <GIC_SPI 254 IRQ_TYPE_LEVEL_HIGH>,
			     <GIC_SPI 255 IRQ_TYPE_LEVEL_HIGH>,
			     <GIC_SPI 256 IRQ_TYPE_LEVEL_HIGH>,
			     <GIC_SPI 260 IRQ_TYPE_LEVEL_HIGH>,
			     <GIC_SPI 261 IRQ_TYPE_LEVEL_HIGH>,
			     <GIC_SPI 262 IRQ_TYPE_LEVEL_HIGH>,
			     <GIC_SPI 272 IRQ_TYPE_LEVEL_HIGH>,
			     <GIC_SPI 273 IRQ_TYPE_LEVEL_HIGH>,
			     <GIC_SPI 274 IRQ_TYPE_LEVEL_HIGH>,
			     <GIC_SPI 275 IRQ_TYPE_LEVEL_HIGH>,
			     <GIC_SPI 276 IRQ_TYPE_LEVEL_HIGH>;
		vdd-supply = <&gdsc_bimc_smmu>;
		clocks = <&clock_mmss MMSS_MNOC_AHB_CLK>,
			 <&clock_rpmcc  RPM_SMD_MMSSNOC_AXI_CLK>,
			 <&clock_mmss MMSS_BIMC_SMMU_AHB_CLK>,
			 <&clock_mmss MMSS_BIMC_SMMU_AXI_CLK>;
		clock-names = "mmss_mnoc_ahb_clk",
			      "mmssnoc_axi_clk",
			      "mmss_bimc_smmu_ahb_clk",
			      "mmss_bimc_smmu_axi_clk";
		#clock-cells = <1>;
		qcom,bus-master-id = <MSM_BUS_MNOC_BIMC_MAS>;
	};

	kgsl_smmu: arm,smmu-kgsl@5040000 {
		compatible = "qcom,smmu-v2";
		reg = <0x5040000 0x10000>;
		#iommu-cells = <1>;
		qcom,dynamic;
		qcom,use-3-lvl-tables;
		qcom,skip-init;
		qcom,disable-atos;
		qcom,regulator-names = "vdd";
		#global-interrupts = <2>;
		interrupts = <GIC_SPI 229 IRQ_TYPE_LEVEL_HIGH>,
			     <GIC_SPI 231 IRQ_TYPE_LEVEL_HIGH>,
			     <GIC_SPI 329 IRQ_TYPE_LEVEL_HIGH>,
			     <GIC_SPI 330 IRQ_TYPE_LEVEL_HIGH>,
			     <GIC_SPI 331 IRQ_TYPE_LEVEL_HIGH>,
			     <GIC_SPI 332 IRQ_TYPE_LEVEL_HIGH>,
			     <GIC_SPI 116 IRQ_TYPE_LEVEL_HIGH>,
			     <GIC_SPI 117 IRQ_TYPE_LEVEL_HIGH>,
			     <GIC_SPI 349 IRQ_TYPE_LEVEL_HIGH>,
			     <GIC_SPI 350 IRQ_TYPE_LEVEL_HIGH>;
		qcom,deferred-regulator-disable-delay = <80>;
		vdd-supply = <&gdsc_gpu_cx>;
		clocks = <&clock_gcc GCC_GPU_CFG_AHB_CLK>,
			 <&clock_gcc GCC_BIMC_GFX_CLK>,
			 <&clock_gcc GCC_GPU_BIMC_GFX_CLK>;
		clock-names = "gcc_gpu_cfg_ahb_clk",
			      "gcc_bimc_gfx_clk",
			      "gcc_gpu_bimc_gfx_clk";
		#clock-cells = <1>;
	};

	turing_q6_smmu: arm,smmu-turing_q6@5180000 {
		compatible = "qcom,smmu-v2";
		reg = <0x5180000 0x40000>;
		#iommu-cells = <1>;
		qcom,register-save;
		qcom,skip-init;
		qcom,regulator-names = "vdd";
		#global-interrupts = <2>;
		interrupts = <GIC_SPI 229 IRQ_TYPE_LEVEL_HIGH>,
			     <GIC_SPI 231 IRQ_TYPE_LEVEL_HIGH>,
			     <GIC_SPI 533 IRQ_TYPE_LEVEL_HIGH>,
			     <GIC_SPI 534 IRQ_TYPE_LEVEL_HIGH>,
			     <GIC_SPI 535 IRQ_TYPE_LEVEL_HIGH>,
			     <GIC_SPI 536 IRQ_TYPE_LEVEL_HIGH>,
			     <GIC_SPI 537 IRQ_TYPE_LEVEL_HIGH>,
			     <GIC_SPI 538 IRQ_TYPE_LEVEL_HIGH>,
			     <GIC_SPI 539 IRQ_TYPE_LEVEL_HIGH>,
			     <GIC_SPI 540 IRQ_TYPE_LEVEL_HIGH>,
			     <GIC_SPI 541 IRQ_TYPE_LEVEL_HIGH>,
			     <GIC_SPI 542 IRQ_TYPE_LEVEL_HIGH>,
			     <GIC_SPI 543 IRQ_TYPE_LEVEL_HIGH>,
			     <GIC_SPI 544 IRQ_TYPE_LEVEL_HIGH>,
			     <GIC_SPI 545 IRQ_TYPE_LEVEL_HIGH>,
			     <GIC_SPI 546 IRQ_TYPE_LEVEL_HIGH>,
			     <GIC_SPI 547 IRQ_TYPE_LEVEL_HIGH>,
			     <GIC_SPI 548 IRQ_TYPE_LEVEL_HIGH>,
			     <GIC_SPI 549 IRQ_TYPE_LEVEL_HIGH>;
		vdd-supply = <&gdsc_hlos1_vote_turing_adsp>;
		clocks = <&clock_gcc HLOS1_VOTE_TURING_ADSP_SMMU_CLK>;
		clock-names = "turing_q6_smmu_clk";
		#clock-cells = <1>;
	};

	iommu_test_device {
		compatible = "iommu-debug-test";
		/*
		 * 42 shouldn't be used by anyone on the mmss_smmu.  We just
		 * need _something_ here to get this node recognized by the
		 * SMMU driver. Our test uses ATOS, which doesn't use SIDs
		 * anyways, so using a dummy value is ok.
		 */
		iommus = <&mmss_bimc_smmu 42>;
	};
};
